<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">    <title>家政服务抢单大厅</title>
    <script src="https://cdn.tailwindcss.com/3.3.3"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css">
    <style>
        body {
            font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
            background-color: #f5f5f5;
            max-width: 750px;
            margin: 0 auto;
        }
        .urgent-border {
            border-left: 4px solid #ff4d4f;
        }
        .match-tag {
            background-color: #1890ff;
        }
        .nearby-tag {
            background-color: #52c41a;
        }
        .active-tab {
            color: #1890ff;
            border-bottom: 2px solid #1890ff;
        }
        .nav-tab.active {
            color: #2563eb;
            position: relative;
        }
        .nav-tab.active::after {
            content: '';
            position: absolute;
            bottom: -8px;
            left: 50%;
            transform: translateX(-50%);
            width: 24px;
            height: 3px;
            background-color: #2563eb;
            border-radius: 3px;
        }
        .order-card {
            transition: all 0.3s ease;
        }
        .order-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }
        .filter-panel {
            transition: all 0.3s ease;
            max-height: 0;
            overflow: hidden;
        }
        .filter-panel.active {
            max-height: 500px;
        }
    </style>
</head>
<body class="pb-16">
    <!-- 顶部导航 -->
    <div class="bg-white sticky top-0 z-10 shadow-sm">
        <div class="p-4 flex items-center justify-between">
            <div class="flex items-center">
                <i class="fas fa-map-marker-alt text-gray-500 mr-1"></i>
                <span class="text-sm font-medium">北京市朝阳区</span>
                <i class="fas fa-chevron-down text-xs ml-1 text-gray-400"></i>
            </div>
            <div class="relative flex-1 mx-4">
                <input type="text" placeholder="搜索服务关键词" class="w-full py-2 px-4 bg-gray-100 rounded-full text-sm focus:outline-none">
                <i class="fas fa-search absolute right-3 top-2.5 text-gray-400"></i>
            </div>
            <button id="filterBtn" class="text-gray-600">
                <i class="fas fa-sliders-h"></i>
            </button>
        </div>
        
        <!-- 筛选面板 -->
        <div id="filterPanel" class="filter-panel bg-white px-4 pb-4">
            <div class="mb-4">
                <h4 class="text-sm font-medium mb-2 text-gray-600">服务类型</h4>
                <div class="flex flex-wrap gap-2">
                    <span class="px-3 py-1 bg-blue-50 text-blue-600 rounded-full text-xs">全部</span>
                    <span class="px-3 py-1 bg-gray-100 text-gray-600 rounded-full text-xs">保洁</span>
                    <span class="px-3 py-1 bg-gray-100 text-gray-600 rounded-full text-xs">保姆</span>
                    <span class="px-3 py-1 bg-gray-100 text-gray-600 rounded-full text-xs">月嫂</span>
                    <span class="px-3 py-1 bg-gray-100 text-gray-600 rounded-full text-xs">维修</span>
                </div>
            </div>
            
            <div class="mb-4">
                <h4 class="text-sm font-medium mb-2 text-gray-600">价格区间</h4>
                <div class="flex items-center">
                    <input type="number" placeholder="最低" class="w-20 px-2 py-1 border rounded text-sm">
                    <span class="mx-2 text-gray-400">-</span>
                    <input type="number" placeholder="最高" class="w-20 px-2 py-1 border rounded text-sm">
                    <button class="ml-2 px-3 py-1 bg-blue-500 text-white rounded text-sm">确定</button>
                </div>
            </div>
            
            <div class="mb-4">
                <h4 class="text-sm font-medium mb-2 text-gray-600">距离范围</h4>
                <div class="flex flex-wrap gap-2">
                    <span class="px-3 py-1 bg-blue-50 text-blue-600 rounded-full text-xs">全部</span>
                    <span class="px-3 py-1 bg-gray-100 text-gray-600 rounded-full text-xs">3公里内</span>
                    <span class="px-3 py-1 bg-gray-100 text-gray-600 rounded-full text-xs">5公里内</span>
                    <span class="px-3 py-1 bg-gray-100 text-gray-600 rounded-full text-xs">10公里内</span>
                </div>
            </div>
            
            <div>
                <h4 class="text-sm font-medium mb-2 text-gray-600">订单状态</h4>
                <div class="flex flex-wrap gap-2">
                    <span class="px-3 py-1 bg-blue-50 text-blue-600 rounded-full text-xs">全部</span>
                    <span class="px-3 py-1 bg-gray-100 text-gray-600 rounded-full text-xs">待接单</span>
                    <span class="px-3 py-1 bg-gray-100 text-gray-600 rounded-full text-xs">加急单</span>
                </div>
            </div>
        </div>
        
        <!-- 排序选项 -->
        <div class="flex items-center justify-between px-4 py-2 border-t border-gray-100 bg-white">
            <div class="flex items-center text-sm">
                <span class="text-gray-500 mr-2">排序:</span>
                <span class="px-2 py-1 bg-blue-50 text-blue-600 rounded mr-2">距离优先</span>
                <span class="px-2 py-1 bg-gray-100 text-gray-600 rounded mr-2">最新发布</span>
                <span class="px-2 py-1 bg-gray-100 text-gray-600 rounded">价格最高</span>
            </div>
            <div class="text-sm text-gray-500">
                <span>今日可抢: <span class="text-blue-500">5</span>/<span class="text-gray-400">10</span></span>
            </div>
        </div>
    </div>
    
    <!-- 订单列表 -->
    <div class="px-4 py-3">
        <div class="text-sm text-gray-500 mb-2">共 <span class="text-blue-500">12</span> 个可接订单</div>
        
        <!-- 订单卡片1 - 加急订单 -->
        <div class="order-card bg-white rounded-lg mb-3 p-4 shadow-sm urgent-border">
            <div class="flex justify-between items-start mb-2">
                <div>
                    <span class="inline-block px-2 py-0.5 bg-red-100 text-red-600 rounded text-xs mr-2">加急</span>
                    <span class="inline-block px-2 py-0.5 match-tag text-white rounded text-xs">匹配您</span>
                </div>
                <span class="text-sm font-medium text-gray-600">¥150</span>
            </div>
            <h3 class="text-base font-medium mb-1">日常保洁服务</h3>
            <div class="flex items-center text-sm text-gray-500 mb-2">
                <i class="fas fa-clock mr-1"></i>
                <span class="mr-3">今天 14:00-16:00</span>
                <i class="fas fa-map-marker-alt mr-1"></i>
                <span>朝阳区大望路</span>
            </div>
            <p class="text-sm text-gray-600 mb-3">需要深度清洁厨房和卫生间，面积约80平米...</p>
            <div class="flex justify-between items-center">
                <span class="inline-block px-2 py-0.5 nearby-tag text-white rounded text-xs">3公里内</span>
                <button class="px-4 py-1.5 bg-red-500 text-white rounded-full text-sm" onclick="confirmGrab(1)">立即抢单</button>
            </div>
        </div>
        
        <!-- 订单卡片2 - 普通订单 -->
        <div class="order-card bg-white rounded-lg mb-3 p-4 shadow-sm">
            <div class="flex justify-between items-start mb-2">
                <span class="inline-block px-2 py-0.5 match-tag text-white rounded text-xs">匹配您</span>
                <span class="text-sm font-medium text-gray-600">¥200</span>
            </div>
            <h3 class="text-base font-medium mb-1">空调清洗服务</h3>
            <div class="flex items-center text-sm text-gray-500 mb-2">
                <i class="fas fa-clock mr-1"></i>
                <span class="mr-3">明天 10:00-12:00</span>
                <i class="fas fa-map-marker-alt mr-1"></i>
                <span>朝阳区国贸</span>
            </div>
            <p class="text-sm text-gray-600 mb-3">需要清洗2台挂式空调，有专业工具...</p>
            <div class="flex justify-between items-center">
                <span class="inline-block px-2 py-0.5 nearby-tag text-white rounded text-xs">3公里内</span>
                <button class="px-4 py-1.5 bg-blue-500 text-white rounded-full text-sm" onclick="confirmGrab(2)">立即抢单</button>
            </div>
        </div>
        
        <!-- 订单卡片3 - 普通订单 -->
        <div class="order-card bg-white rounded-lg mb-3 p-4 shadow-sm">
            <div class="flex justify-between items-start mb-2">
                <span class="text-sm font-medium text-gray-600">¥300</span>
            </div>
            <h3 class="text-base font-medium mb-1">月嫂服务</h3>
            <div class="flex items-center text-sm text-gray-500 mb-2">
                <i class="fas fa-clock mr-1"></i>
                <span class="mr-3">7月15日-8月15日</span>
                <i class="fas fa-map-marker-alt mr-1"></i>
                <span>朝阳区望京</span>
            </div>
            <p class="text-sm text-gray-600 mb-3">需要照顾新生儿和产妇，有经验者优先...</p>
            <div class="flex justify-between items-center">
                <span class="text-xs text-gray-500">约5公里</span>
                <button class="px-4 py-1.5 bg-blue-500 text-white rounded-full text-sm" onclick="confirmGrab(3)">立即抢单</button>
            </div>
        </div>
    </div>
    
    <!-- 底部导航 -->
    <div class="fixed bottom-0 left-0 right-0 bg-white border-t border-gray-100 flex justify-around py-2 max-w-750 mx-auto">
        <a href="aunt-home.html" class="nav-tab flex flex-col items-center px-4 py-1 text-xs text-gray-500">
            <i class="fas fa-home text-lg mb-1"></i>
            <span>首页</span>
        </a>
        <a href="order-grab.html" class="nav-tab active flex flex-col items-center px-4 py-1 text-xs">
            <i class="fas fa-bolt text-lg mb-1"></i>
            <span>抢单</span>
        </a>
        <a href="aunt-orders.html" class="nav-tab flex flex-col items-center px-4 py-1 text-xs text-gray-500">
            <i class="fas fa-clipboard-list text-lg mb-1"></i>
            <span>订单</span>
        </a>
        <a href="member-center.html" class="nav-tab flex flex-col items-center px-4 py-1 text-xs text-gray-500">
            <i class="fas fa-user text-lg mb-1"></i>
            <span>我的</span>
        </a>
    </div>
    
    <!-- 抢单确认弹窗 -->
    <div id="confirmModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-20 hidden">
        <div class="bg-white rounded-lg w-4/5 max-w-sm p-6">
            <h3 class="text-lg font-medium mb-4">确认抢单</h3>
            <p class="text-gray-600 mb-6">确定要接取这个服务订单吗？抢单成功后需按时完成服务。</p>
            <div class="flex justify-between">
                <button onclick="closeModal()" class="px-6 py-2 border border-gray-300 rounded-lg text-gray-600">取消</button>
                <button onclick="grabOrder()" class="px-6 py-2 bg-blue-500 text-white rounded-lg">确认</button>
            </div>
        </div>
    </div>
    
    <script>
        // 筛选面板切换
        const filterBtn = document.getElementById('filterBtn');
        const filterPanel = document.getElementById('filterPanel');
        
        filterBtn.addEventListener('click', function() {
            filterPanel.classList.toggle('active');
        });
        
        // 抢单确认
        let currentOrderId = 0;
        
        function confirmGrab(orderId) {
            currentOrderId = orderId;
            document.getElementById('confirmModal').classList.remove('hidden');
        }
        
        function closeModal() {
            document.getElementById('confirmModal').classList.add('hidden');
        }
        
        function grabOrder() {
            alert('抢单成功！订单ID: ' + currentOrderId);
            closeModal();
            // 这里可以添加实际的抢单逻辑
        }
        
        // 点击页面其他区域关闭筛选面板
        document.addEventListener('click', function(event) {
            if (!filterBtn.contains(event.target) && !filterPanel.contains(event.target)) {
                filterPanel.classList.remove('active');
            }
        });
    </script>
</body>
</html>